package com.traffic.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.traffic .mapper.DailyReimbursementMapper;
import com.traffic .domain.DailyReimbursement;
import com.traffic .service.IDailyReimbursementService;

/**
 * 日常报销Service业务层处理
 * 
 * @author ywt
 * @date 2024-09-19
 */
@Service
public class DailyReimbursementServiceImpl implements IDailyReimbursementService 
{
    @Autowired
    private DailyReimbursementMapper dailyReimbursementMapper;

    /**
     * 查询日常报销
     * 
     * @param id 日常报销主键
     * @return 日常报销
     */
    @Override
    public DailyReimbursement selectDailyReimbursementById(Long id)
    {
        return dailyReimbursementMapper.selectDailyReimbursementById(id);
    }

    /**
     * 查询日常报销列表
     * 
     * @param dailyReimbursement 日常报销
     * @return 日常报销
     */
    @Override
    public List<DailyReimbursement> selectDailyReimbursementList(DailyReimbursement dailyReimbursement)
    {
        return dailyReimbursementMapper.selectDailyReimbursementList(dailyReimbursement);
    }

    /**
     * 新增日常报销
     * 
     * @param dailyReimbursement 日常报销
     * @return 结果
     */
    @Override
    public int insertDailyReimbursement(DailyReimbursement dailyReimbursement)
    {
        dailyReimbursement.setCreateTime(DateUtils.getNowDate());
        return dailyReimbursementMapper.insertDailyReimbursement(dailyReimbursement);
    }

    /**
     * 修改日常报销
     * 
     * @param dailyReimbursement 日常报销
     * @return 结果
     */
    @Override
    public int updateDailyReimbursement(DailyReimbursement dailyReimbursement)
    {
        return dailyReimbursementMapper.updateDailyReimbursement(dailyReimbursement);
    }

    /**
     * 批量删除日常报销
     * 
     * @param ids 需要删除的日常报销主键
     * @return 结果
     */
    @Override
    public int deleteDailyReimbursementByIds(Long[] ids)
    {
        return dailyReimbursementMapper.deleteDailyReimbursementByIds(ids);
    }

    /**
     * 删除日常报销信息
     * 
     * @param id 日常报销主键
     * @return 结果
     */
    @Override
    public int deleteDailyReimbursementById(Long id)
    {
        return dailyReimbursementMapper.deleteDailyReimbursementById(id);
    }
}
